//
//  KABLoginModel.h
//  kabu
//
//  Created by XiangDongMBP on 2017/1/24.
//  Copyright © 2017年 East. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <YYModel.h>

#pragma mark - 收货地址
@interface KABReceiverInfoItem : NSObject<NSCoding>
@property (nonatomic, assign) NSInteger receiverId;     //!< @"id"--@"receiverId", 编号
@property (nonatomic, assign) NSInteger user_id;        //!< 用户id
@property (nonatomic, copy)   NSString *receiver_name;  //!< 收货人名称
@property (nonatomic, copy)   NSString *receiver_phone; //!< 收货人电话
@property (nonatomic, copy)   NSString *province;       //!< 省份
@property (nonatomic, copy)   NSString *city;           //!< 城市
@property (nonatomic, copy)   NSString *district;       //!< 区
@property (nonatomic, copy)   NSString *address;        //!< 详细地址
@property (nonatomic, assign) BOOL is_default;          //!< 是否为默认地址，0-否 1-是
@end

@interface KABReceiverInfoList : NSObject<NSCoding>
@property (nonatomic, assign) NSInteger total_rows;         //!< 数据总量
@property (nonatomic, strong) NSMutableArray<KABReceiverInfoItem *> *receiver_info_list; //!< 收货地址列表

@property (nonatomic, assign) NSInteger selReceiverId;      //!< 标记用户选择哪个作为收货地址(该值可能不存在，使用的时候要判断)
@property (nonatomic, readonly) KABReceiverInfoItem *selReceiverInfoItem;       //!< 用户当前使用的收货地址
@property (nonatomic, readonly) KABReceiverInfoItem *defaultReceiverInfoItem;   //!< 获取默认收货地址
@property (nonatomic, readonly) BOOL totalLoad;
- (void)setDefaultReceiverWithRecId:(NSInteger)recId;

@end

#pragma mark - 登录返回
@interface KABLoginMiscInfo : NSObject<NSCoding>
@property (nonatomic, assign) NSInteger total_follow;       //!< 关注总数
@property (nonatomic, assign) NSInteger total_fans;         //!< 粉丝总数
@property (nonatomic, assign) NSInteger total_collect_cosplay;  //!< 收藏的cos总数
@property (nonatomic, assign) BOOL is_celebrity;            //!< 是否为名人，0-不是 1是
@property (nonatomic, assign) NSInteger ranking_id;         //!< 名人排行id，从1开始
@property (nonatomic, assign) BOOL is_merchant;             //!< 是否为商户：0-不是 1-是
@end

@class KABMineInfo;
@interface KABLoginModel : NSObject<YYModel, NSCoding>
@property (nonatomic, copy)   NSString *access_token;  //!< 请求令牌，以后的操作均需要带上这个token
@property (nonatomic, assign) NSInteger uid;           //!< @"id"--@"uid", 用户唯一id
@property (nonatomic, copy)   NSString *account;       //!< 用户名
@property (nonatomic, copy)   NSString *nick_name;     //!< 昵称
@property (nonatomic, copy)   NSString *sign;          //!< 个人签名
@property (nonatomic, copy)   NSString *headimg_url;   //!< 头像url地址
@property (nonatomic, copy)   NSString *country;       //!< 国籍
@property (nonatomic, copy)   NSString *province;      //!< 省份
@property (nonatomic, copy)   NSString *city;          //!< 城市
@property (nonatomic, copy)   NSString *birthday;      //!< 生日
@property (nonatomic, copy)   NSString *phone_number;  //!< 手机号
@property (nonatomic, assign) NSInteger sex;           //!< 性别：0-女 1-男 2-未知
@property (nonatomic, assign) BOOL is_gm;              //!< 是否为管理员：0-不是 1-是
@property (nonatomic, assign) NSInteger login_method;  //!< 登录方式：0-普通登录 1-微信登录
@property (nonatomic, assign) BOOL is_bind_phonenumber;//!< 手机是否绑定，0-否 1-是
@property (nonatomic, copy)   NSString *qiniu_upload_token;  //!< 七牛上传token
@property (nonatomic, copy)   NSString *rongcloud_token;     //!< 融云Token
@property (nonatomic, strong) KABLoginMiscInfo *misc_detail;        //!< 一些个人关注信息
@property (nonatomic, strong) KABReceiverInfoItem *receiver_info;   //!< 默认收货地址(这里不打算使用，统一使用默认收货地址列表)

@property (nonatomic, readonly) NSString *sexStr;
@property (nonatomic, readonly) NSString *areaStr;
@property (nonatomic, readonly) NSString *uidStr;

- (void)updateInfoWithMineInfo:(KABMineInfo *)info;

@end

#pragma mark - 我的粉丝、我的爱豆、@用户列表、搜索用户列表
@interface KABMineUserItem : NSObject
@property (nonatomic, assign) NSInteger user_id;       //!< 粉丝id
@property (nonatomic, copy)   NSString *nick_name;     //!< 用户昵称
@property (nonatomic, copy)   NSString *sign;          //!< 签名
@property (nonatomic, copy)   NSString *headimg_url;   //!< 用户头像
@property (nonatomic, assign) NSInteger follow_state;  //!< 0:未关注 1:已关注 2:已被对方关注 3:互粉
@end

@interface KABMineUserList : NSObject
@property (nonatomic, assign) NSInteger total_rows;         //!< 数据总量
@property (nonatomic, strong) NSMutableArray<KABMineUserItem *> *user_list; //!< @"fan_list"、@"follow_list"、@"users"

@property (nonatomic, readonly) BOOL totalLoad;
- (void)addMoreWithData:(KABMineUserList *)temp;
@end


#pragma mark - 我的消息
@interface KABMineMsgItem : NSObject
@property (nonatomic, assign) NSInteger msgId;          //!< @"id"--@"msgId", 用户唯一id
@property (nonatomic, assign) NSInteger a_user_id;      //!< 动作发起者
@property (nonatomic, copy)   NSString *a_nick_name;    //!< 动作发起者用户昵称
@property (nonatomic, copy)   NSString *a_headimg_url;  //!< 动作发起者头像
@property (nonatomic, copy)   NSString *action;         //!< 动作
@property (nonatomic, copy)   NSString *what;           //!< 作用事物
@property (nonatomic, copy)   NSString *time;           //!< 发生时间
@property (nonatomic, assign) NSInteger state;          //!< 消息状态，0-已读， 1-未读
@property (nonatomic, assign) NSInteger cosplay_id;     //!< cosplayId
@property (nonatomic, assign) BOOL is_cosplay_exist;    //!< Cosplay是否存在
@end

@interface KABMineMsgList : NSObject
@property (nonatomic, assign) NSInteger total_rows;         //!< 数据总量
@property (nonatomic, strong) NSMutableArray<KABMineMsgItem *> *message_list;

@property (nonatomic, readonly) BOOL totalLoad;
- (void)addMoreWithData:(KABMineMsgList *)temp;
@end

@interface KABMineNewMsg : NSObject<NSCoding>
@property (nonatomic, assign) NSInteger new_praise_number;   //!< 点赞数
@property (nonatomic, assign) NSInteger new_comment_number;  //!< 评论数
@property (nonatomic, assign) NSInteger new_reply_number;    //!< 回复数

@property (nonatomic, readonly) NSInteger totalNewMsgCnt;   //!< 总共未读消息的数量
@end

#pragma mark - 个人主页
@interface KABMineHpUserDetail : NSObject
@property (nonatomic, assign) NSInteger user_id;            //!< 用户唯一id
@property (nonatomic, copy)   NSString *nick_name;          //!< 昵称
@property (nonatomic, copy)   NSString *headimg_url;        //!< 头像url地址
@property (nonatomic, copy)   NSString *homepage_img_url;   //!< 个人主页背景图片
@property (nonatomic, copy)   NSString *sign;               //!< 签名
@property (nonatomic, assign) NSInteger sex;                //!< 性别：0-女 1-男 2-未知
@property (nonatomic, assign) NSInteger total_follow;       //!< 关注总数
@property (nonatomic, assign) NSInteger total_fans;         //!< 粉丝总数
@property (nonatomic, assign) NSInteger total_collect_cosplay;  //!< 收藏的cos总数
@property (nonatomic, assign) BOOL is_celebrity;            //!< 是否为名人，0-不是 1是
@property (nonatomic, assign) NSInteger ranking_id;         //!< 名人排行
@end
@class KABCosListItem;
@interface KABMineHomepage : NSObject
@property (nonatomic, strong) KABMineHpUserDetail *user_detail;
@property (nonatomic, assign) NSInteger total_rows;         //!< 数据总量
@property (nonatomic, assign) NSInteger total_photo;        //!< 相册总数量
@property (nonatomic, assign) NSInteger follow_state;       //!< //!< 0:未关注 1:已关注 2:已被对方关注 3:互粉
@property (nonatomic, strong) NSMutableArray<KABCosListItem *> *cosplay_list;

@property (nonatomic, readonly) BOOL totalLoad;
- (void)removeCosListItem:(KABCosListItem *)item;
- (void)addMoreWithData:(KABMineHomepage *)temp;
@end

#pragma mark - 我的相册
@interface KABMinePhotoItem : NSObject
@property (nonatomic, assign) NSInteger photoId;        //!< 图片的编号
@property (nonatomic, assign) NSInteger cosplay_id;     //!< 图片所属cosplay编号
@property (nonatomic, copy)   NSString *image_url;      //!< 图片url
@property (nonatomic, copy)   NSString *publish_time;   //!< 发布时间
@end

@interface KABMinePhoto : NSObject
@property (nonatomic, assign) NSInteger total_rows;     //!< 数据总量
@property (nonatomic, strong) NSMutableArray<KABMinePhotoItem *> *photo_list;   //!< 原始数据
@property (nonatomic, strong) NSMutableArray<NSMutableArray *> *sort_list;      //!< 按照时间整理后的数据

@property (nonatomic, readonly) BOOL totalLoad;
- (void)addMoreWithData:(KABMinePhoto *)temp;
@end

#pragma mark - 设置里面的通知开关
@interface KABMineSettingPushModel : NSObject
@property (nonatomic, assign) BOOL is_exhibition_notify;    //!< 是否开启展会开售通知，0-否 1-是
@property (nonatomic, assign) BOOL is_concern_notify;       //!< 是否开启关注通知，0-否 1-是
@property (nonatomic, assign) BOOL is_comment_notify;       //!< 是否开启评论通知，0-否 1-是

- (BOOL)pushNotifyStateWithIndex:(NSInteger)index;                  //!< 0-展会提醒 1-关注通知 2-评论通知
- (void)setNotifyState:(BOOL)is_notified WithIndex:(NSInteger)index;//!< 0-展会提醒 1-关注通知 2-评论通知
@end


#pragma mark - 个人信息
@interface KABMineInfo : NSObject
@property (nonatomic, assign) NSInteger user_id;        //!< 用户唯一id
@property (nonatomic, copy)   NSString *account;        //!< 账户
@property (nonatomic, copy)   NSString *nick_name;      //!< 昵称
@property (nonatomic, copy)   NSString *headimg_url;    //!< 头像url地址
@property (nonatomic, copy)   NSString *sign;           //!< 签名
@property (nonatomic, assign) NSInteger sex;            //!< 性别：0-女 1-男 2-未知
@property (nonatomic, assign) NSInteger total_follow;   //!< 关注总数
@property (nonatomic, assign) NSInteger total_fans;     //!< 粉丝总数
@property (nonatomic, assign) NSInteger total_collect_cosplay;  //!< 收藏的cos总数
@property (nonatomic, assign) BOOL is_merchant;             //!< 是否为商户：0-不是 1-是
@property (nonatomic, assign) BOOL is_celebrity;            //!< 是否为名人，0-不是 1是
@property (nonatomic, assign) NSInteger ranking_id;         //!< 名人排行id，从1开始
@end


#pragma mark - 融云联系人列表信息
@interface KABMineIMUserInfo : NSObject
@property (nonatomic, assign) NSInteger user_id;            //!< 用户id
@property (nonatomic, copy)   NSString *user_nickname;      //!< 用户昵称
@property (nonatomic, copy)   NSString *user_headimg_url;   //!< 用户头像
@property (nonatomic, assign) BOOL is_merchant;             //!< 是否为商户：0-不是 1-是
@property (nonatomic, assign) NSInteger shop_id;            //!< 店铺id
@property (nonatomic, copy)   NSString *shop_name;          //!< 店铺名称

@property (nonatomic, readonly) NSString *imName;           //!< IM显示的昵称

@end
